import Vue from "vue";
import Router from "vue-router";
import Login from "./views/login/login.vue";
import Main from "./views/Main/main.vue";

import Home from "./views/Home/Home.vue";
import Monitor from "./views/Monitor";
import Events from "./views/Events";
import StationAnalysis from "./views/StationAnalysis";
import TabContent from "./views/StationAnalysis/tabContent.vue"
import SubCompanyAnalysis from "./views/SubCompanyAnalysis";

Vue.use(Router);

export default new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/login",
      name: "login",
      component: Login
    },
    {
      path: "/",
      name: "_home",
      redirect: '/station-analysis',
      component: Main,
      children: [
        {
          path: '/station-analysis',
          name: 'station-analysis',
          component: StationAnalysis,
          children: [
            {
              path: 'station/:station/:dateTime',
              name: 'station',
              component: TabContent
            }
          ]
        },
        {
          path: "/monitor",
          name: "monitor",
          component: Monitor
        },
        {
          path: "/events",
          name: "events",
          component: Events
        }
      ]
    },
    // {
    //   path: "/",
    //   name: "station-analysis",
    //   // redirect: '/station-analysis/station/caotan/today',
    //   component: StationAnalysis
    // },
    // {
    //   path: "/monitor",
    //   name: "monitor",
    //   component: Monitor
    // },
    // {
    //   path: "/sub-company-analysis/:companyName/:dateTime",
    //   name: "sub-company-analysis",
    //   component: SubCompanyAnalysis
    // },
    // {
    //   path: 'station/:station/:dateTime',
    //   name: 'station',
    //   component: TabContent
    // },
    // {
    //   path: "/station-analysis",
    //   name: "station-analysis",
    //   component: StationAnalysis,
    //   children: [
    //     {
    //       path: 'station/:station/:dateTime',
    //       name: 'station',
    //       component: TabContent
    //     }
    //   ]
    // },
    // {
    //   path: "/events",
    //   name: "events",
    //   component: Events
    // }
  ]
});
